﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySoft.Data;
using MongoDB.Bson;

namespace WanPiJie.Products
{
    public interface ISalesInfoService
    {
        /// <summary>
        /// 根据商品编号获得商品的销售信息
        /// </summary>
        /// <param name="SerialNumber">商品编号</param>
        /// <returns>特定商品编号的商品销售信息</returns>
        List<SalesInfo> GetSalesInformation(Int64 SerialNumber);

        /// <summary>
        /// 是否存在指定的销售信息
        /// </summary>
        /// <param name="serialNumber">商品编号</param>
        /// <param name="supplier">提供商</param>
        /// <returns>True：存在,False：不存在</returns>
        bool HasSalesInformation(long serialNumber, string supplier);

        /// <summary>
        /// 更新销售信息
        /// </summary>
        /// <param name="serialNumber">商品编号</param>
        /// <param name="supplier">提供商</param>
        /// <param name="url">购买链接</param>
        /// <param name="price">价格</param>
        void Update(long serialNumber, string supplier, string url, decimal price, string picture, int volume);
    }
}
